<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>正则表达式</title>
</head>

<body>
	
</body>
<script>
	
	str='linux and linox and linax lin x php and LINUX and Php and pap and pbp nd pcp and linxx is lamp';
	arr=str.match(/lin[^ux]x/ig); //中括号加^,除了中括号内部的任意一个字符
	//除了linux，linxx,以外的字符，结果为linox,linax,lin x,任意一个字符，空格也算。linx没有空格字符，所以不算
	alert(arr);
</script>
</html>